Skip to content

ci: bake Actions cost-control patterns into template workflows#57

Merged
gracefullight merged 1 commit into
mainfrom
feature/gha-cost-controls
Jul 10, 2026
Merged

ci: bake Actions cost-control patterns into template workflows#57
gracefullight merged 1 commit into
mainfrom
feature/gha-cost-controls

Conversation

@gracefullight

Copy link
Copy Markdown
Member

Summary

  • Cut private GitHub Actions billable minutes (~50% target org-wide) by applying deploy cost controls.
  • Docker GHA layer cache (docker/build-push-action + cache-from/to: type=gha,scope=<image>) so warm builds skip cold layer rebuilds.
  • concurrency.cancel-in-progress: true so rapid main pushes only finish the latest SHA.
  • Narrow paths: — drop over-broad packages/** fan-out; list only packages each service actually COPYs/imports.
  • Deploy is main-only (no PR deploy where applicable); PR lint stays in review.yml.

Why

Org private Actions usage was ~1,987 / 2,000 free minutes (Jul). Top burners: sajubom deploy-web, contents/place/legalize ACA deploys.

Test plan

  • Merge and push a no-op under the service path → deploy runs once
  • Second quick push while first is building → first run cancelled
  • Second deploy warm-build should be materially faster (cache hit in Buildx log)
  • Unrelated package path (e.g. design-tokens when only api/core changed) does not trigger wrong service

add gha docker cache, cancel concurrency, release-please paths-ignore,
and a workflows readme playbook for product monorepos to copy.
@github-actions github-actions Bot added the size/m label Jul 9, 2026
@gracefullight gracefullight merged commit da38591 into main Jul 10, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant